<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1"/>
    <title>商户管理系统</title>
    <link href="css/vendor.css" rel="stylesheet">
    <link href="css/login1.css" rel="stylesheet">
    <link rel="stylesheet" href="./layui/css/layui.css">
    <link rel="stylesheet" href="css/style.css">
    <script src="./js/config.js"></script>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="/shiroCas/js/xdd/login/js/html5shiv.min.js"></script>
    <script src="/shiroCas/js/xdd/login/js/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="xddb-wrapper">
    <div class="xddb-header">
        <div class="xddb-nav">

            <!--<div class="xddb-entry">
            <span class="state"><a href="javascript:;" target="_self">去官网</a></span>
            <span class="state bdlt"><a href="agent.html" target="_self">我是代理商</a></span>
        </div>-->
        </div>
    </div>
    <div class="xddb-container">
        <div class="xddb-content">
            <div class="xddb-login">
                <div class="xddb-login-wrap">
                    <fieldset>
                        <legend>欢迎登录</legend>
                        <div class="form-group">
                            <label for="username">
                                账号</label>
                            <input id="username" name="username" class="form-control" tabindex="1" placeholder="登录账户"
                                   type="text" value="" size="25" autocomplete="off"/>
                        </div>
                        <div class="form-group">
                            <label for="password">
                                密码</label>
                            <input id="password" name="password" class="form-control" tabindex="2" placeholder="登录密码"
                                   type="password" value="" size="25" autocomplete="off"/>
                        </div>
                        <div class="xddb-btns-box">
                            <input type="submit" class="btn loginData btn-warning toRight btn-lg col-xs-12"
                                   name="submit"
                                   value="登录"/>
                        </div>
                    </fieldset>
                </div>
            </div>
        </div>
        <div class="xddb-bg">
            <div class="items">
                <div class="item item4 toRightTop" style="display: block; opacity: 1">
                </div>
                <div id="particles-js" class="xddb-bg-part">
                </div>
            </div>
        </div>
    </div>
    <div class="xddb-footer">
        <h3>
            2018 &copy; 版权所有：卡乐购</h3>
    </div>
</div>
<script type="text/javascript" src="js/vendor.js"></script>
<script type="text/javascript" src="js/login.js"></script>

<script src="./layui/layui.js"></script>

<script>
    $(".loginData").on("click", function (e) {
        $.ajax(ip + 'turn/login', {
            type: 'post',
            dataType: 'json',
            data: {
                'username': $('#username').val(),
                'password': $('#password').val()
            }
        }).done(function (data) {
            if (data.header.res_code == 0) {
                window.history.back(-1);
            } else {
                alert(data.header.message);
            }
        })

    });

</script>
</body>
</html>
